﻿using System;
using System.Collections.Generic;
using System.Text;

namespace YunFeng.TypeCreator.Models
{
    /// <summary>
    /// 期望的类型
    /// </summary>
    public class TypeExpectation
    {
        public string ClassName { get; set; }

        public List<PropertyDescription> Properties { get; set; }
    }


    /// <summary>
    /// 期望的属性描述
    /// </summary>
    public class PropertyDescription
    {
        /// <summary>
        /// 属性名
        /// </summary>
        public string PropertyName { get; set; }

        /// <summary>
        /// 属性类型
        /// </summary>
        public Type PropertyType { get; set; }

        /// <summary>
        /// 属性值
        /// </summary>
        public object PropertyValue { get; set; }

        /// <summary>
        /// 属性上的特性
        /// </summary>
        public List<AttributeOnProperty> Attributes { get; set; }
    }

    /// <summary>
    /// 在属性上的特性
    /// </summary>
    public class AttributeOnProperty
    {
        /// <summary>
        ///特性的类型
        /// </summary>
        public Type AttributeType { get; set; }

        /// <summary>
        /// 特性的构造函数类型
        /// </summary>
        public Type[] AttributeConstructorType { get; set; }

        /// <summary>
        /// <summary>
        /// 特性的构造函数参数
        /// </summary>
        /// </summary>
        public object[] AttributeConstructorTypeParam { get; set; }
    }
}
